<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询（media queries）功能 -->
    <!-- 警告：通过 file:// 协议（就是直接将 html 页面拖拽到浏览器中）访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->

    <!--引入字体图标相关的样式文件-->
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

    <style>
        .content{
            background-color: #f5f5f5;
        }


        .proList{
            width: 1200px;
            margin: 0 auto;
            overflow: hidden;
        }

        .col-md-3{
            padding: 6px;
            height: 352px;
            width: 292px;
            background-color: #fff;
            margin-right: 10px;
            margin-bottom: 10px;
            transition-duration: 0.5s;
            position: relative;
            left: 16px;
        }
        .col-md-3:hover{
            transform: scale(1.05);
        }

        .pro-item{
            width: 100%;
            font-size: 15px;
            margin-top: 8px;
            color: #666;
        }

        .module{
            height: 30px;
            margin-top: 4px;
        }

        .price{
            color: #f43;
            font-weight: 600;
            font-size: 18px;
            float: left;
        }


        .sales{
            color: #999;
            font-size: 12px;
            float: right;
            margin-top: 6px;
        }
        ul{
            list-style-type: none;
        }
        li{
            float: left;
            margin: 10px;
        }
        #header{
            margin: 0 auto;
        }
    </style>



</head>
<body>
<!--头部分类-->
<div id="header">
    <ul>
        <li v-for="c in c_arr">
            <a :href="'/list.html?cid='+c.id" >{{c.name}}</a>
        </li>
    </ul>
</div>
<!--分类页面-->
<div class="content" >
    <div class="proList">
        <div class="row">
            <div class="col-md-3" v-for="p in p_arr">
                <a href="" style="text-decoration: none;" >
                    <img class="img-responsive" :src="p.url" alt="" >
                    <p class="pro-item">{{p.title}}</p>
                    <div class="module">
                        <p class="price">{{p.price}}</p>
                        <span class="sales">{{p.intro}}</span>
                    </div>
                </a>
            </div>
        </div>
    </div>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
<!--引入axios框架-->
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<!--引入vue框架-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

<script src="js/header.js"></script>
<script src="js/product.js"></script>


</body>
</html>